home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle: Internet utan modem / Internet CD.iso / web / computer / wwweps~1.com / adam / galactic.dcr / 00101.ls < prev    next >
Encoding:
Text File  |  1997-03-06  |  1.5 KB  |  55 lines

  1. on new_level
  2.   global level, speed_of_astroids, max_littleships, max_littlebullets, max_astroids, little_ships_bullets, bullets_speed, astroidlist, lil_list, lil_bulletlist, bulletlist, max_bullets
  3.   set level to level + 1
  4.   put level into field "level"
  5.   if level = 9 then
  6.     final_level()
  7.     exit
  8.   end if
  9.   set speed_of_astroids to 6 + (level * 2)
  10.   if level < 3 then
  11.     set max_littleships to 0
  12.   end if
  13.   if level > 3 then
  14.     set max_littleships to level - 3
  15.   end if
  16.   set max_littlebullets to level
  17.   set max_astroids to 3 + level
  18.   if level > 2 then
  19.     set max_astroids to 5
  20.   end if
  21.   set little_ships_bullets to 4
  22.   set bullets_speed to 20
  23.   set lil_bulletlist to []
  24.   set mright to 0
  25.   set bulletlist to []
  26.   set astroidlist to []
  27.   set lil_list to []
  28.   repeat with t = 1 to max_littleships
  29.     add(lil_list, birth(script "lil_ship script", count(lil_list) + 23))
  30.   end repeat
  31.   repeat with t = 1 to max_littlebullets
  32.     setAt(lil_bulletlist, t, 0)
  33.   end repeat
  34.   repeat with t = 1 to max_astroids
  35.     set n to random(2)
  36.     if n = 1 then
  37.       set h to random(200) - 400
  38.     end if
  39.     if n = 2 then
  40.       set h to random(200) + 800
  41.     end if
  42.     set V to random(800) - 400
  43.     set num to random(5) + 67
  44.     add(astroidlist, birth(script "astroid script", count(astroidlist) + 12, h, V, num))
  45.   end repeat
  46.   set bulletlist to []
  47.   repeat with t = 1 to max_bullets
  48.     setAt(bulletlist, t, 0)
  49.   end repeat
  50.   repeat with t = 1 to max_bullets
  51.     set the visible of sprite (t + 4) to 0
  52.     setAt(bulletlist, t, 0)
  53.   end repeat
  54. end
  55.